package thread.blockingQueue;

import java.util.concurrent.LinkedBlockingDeque;

public class Demo1 {
    public static void main(String[] args) throws InterruptedException {
        LinkedBlockingDeque<Object> blockedQueue = new LinkedBlockingDeque<>();
        //入队列， 如果此时队列满 就回阻塞
        blockedQueue.put("zhangsan");
        // 出队列. 如果没有 put 直接 take, 就会阻塞.
        System.out.println(blockedQueue.take());
    }
}
